import request from '@/utils/request'

// 创建巡检类型
export function createPollingType(data) {
  return request({
    url: '/abu/polling-type/create',
    method: 'post',
    data: data
  })
}

// 更新巡检类型
export function updatePollingType(data) {
  return request({
    url: '/abu/polling-type/update',
    method: 'put',
    data: data
  })
}

// 删除巡检类型
export function deletePollingType(id) {
  return request({
    url: '/abu/polling-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得巡检类型
export function getPollingType(id) {
  return request({
    url: '/abu/polling-type/get?id=' + id,
    method: 'get'
  })
}

// 获得巡检类型分页
export function getPollingTypePage(query) {
  return request({
    url: '/abu/polling-type/page',
    method: 'get',
    params: query
  })
}

// 导出巡检类型 Excel
export function exportPollingTypeExcel(query) {
  return request({
    url: '/abu/polling-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
